<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        * {
            padding: 0px;
            margin: 0px;
        }
        a {
            text-decoration: none;
        }
        #uu>li {
            list-style-type: none;
            width: 50px;
            height: 30px;
            border: 1px solid red;
            margin-bottom: -1px;
        }
        #uu {
            float: left;
        }
        #pictures {
            float: left;
        }
        #pictures>li {
            display: none;
        }
    </style>
    <script src="../jquery-3.3.1.min.js"></script>
    <script>
        $(function(){
            $("#pictures>li:eq("+0+")").show();
            $("#uu>li").mouseenter(function(){
                // 获取当前li的索引值
                var index = $(this).index();
                console.log(index);
                // 隐藏所有图片
                $("#pictures>li").hide();
                // 显示指定的li
                $("#pictures>li:eq("+index+")").show();
            });
            $("#uu>li").mouseleave(function(){
                $("#pictures>li").hide();
                $("#pictures>li:eq("+0+")").show();
            });
        });
    </script>
</head>
<body>
    <div class="box">
        <ul id="uu">
            <li><a href="">1</a></li>
            <li><a href="">2</a></li>
            <li><a href="">3</a></li>
            <li><a href="">4</a></li>
            <li><a href="">5</a></li>
            <li><a href="">6</a></li>
        </ul>
        <ul id="pictures">
            <li><a href=""><img src="img/1.png" alt="" height="185px"></a></li>
            <li><a href=""><img src="img/2.png" alt="" height="185px"></a></li>
            <li><a href=""><img src="img/3.png" alt="" height="185px" ></a></li>
            <li><a href=""><img src="img/4.png" alt="" height="185px" ></a></li>
            <li><a href=""><img src="img/5.png" alt="" height="185px"  ></a></li>
            <li><a href=""><img src="img/6.png" alt="" height="185px"  ></a></li>
        </ul>
    </div>  
</body>
</html>